package cn.iocoder.yudao.module.ai.dal.mysql.jupyter;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.ai.dal.dataobject.jupyter.JupyterDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.ai.controller.admin.jupyter.vo.*;

/**
 * jupyter容器管理 Mapper
 *
 * @author gt
 */
@Mapper
public interface JupyterMapper extends BaseMapperX<JupyterDO> {

    default PageResult<JupyterDO> selectPage(JupyterPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<JupyterDO>()
                .eqIfPresent(JupyterDO::getWorkPath, reqVO.getWorkPath())
                .betweenIfPresent(JupyterDO::getAutoCloseTime, reqVO.getAutoCloseTime())
                .eqIfPresent(JupyterDO::getOpenPort, reqVO.getOpenPort())
                .betweenIfPresent(JupyterDO::getCreateTime, reqVO.getCreateTime())
                .likeIfPresent(JupyterDO::getJupyterName, reqVO.getJupyterName())
                .eqIfPresent(JupyterDO::getJupyterDesc, reqVO.getJupyterDesc())
                .orderByDesc(JupyterDO::getJupyterId));
    }



}